Skip to content

Conversation

@neooriginal
Copy link
Collaborator

Seems like a recent commit made a google storage billing account necessary, else transcription won't work.

This very simple fix changes that.

Error handling improvements:

  • Updated the import statement to include the Forbidden exception from google.cloud.exceptions for more granular error handling.
  • Modified get_user_has_speech_profile to immediately return False if the speech_profiles_bucket is not set, preventing unnecessary operations.
  • Added a try/except block to catch Forbidden exceptions when checking if a speech profile blob exists, ensuring the function returns False if access is denied.

@neooriginal neooriginal requested review from beastoin and mdmohsin7 and removed request for beastoin January 20, 2026 21:16
Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request aims to make Google Cloud Storage optional and improve error handling by catching Forbidden exceptions. The changes are in the right direction, but the try...except block in get_user_has_speech_profile is incomplete. It doesn't cover all API calls that could raise a Forbidden exception, potentially leaving an unhandled exception. I've left a critical comment with a suggestion to make the error handling more robust.

@neooriginal
Copy link
Collaborator Author

@gemini-code-assist fixed. re-review

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request effectively addresses an issue where a missing or misconfigured Google Cloud Storage billing account would cause transcription to fail. The changes introduced in backend/utils/other/storage.py are straightforward and correct. By adding a check for the speech_profiles_bucket configuration and handling Forbidden exceptions, the get_user_has_speech_profile function is now more robust and will gracefully return False in these scenarios. This makes the Google Storage dependency optional as intended. The implementation is clean and I have no concerns. Good job!

@neooriginal
Copy link
Collaborator Author

Code Review

This pull request effectively addresses an issue where a missing or misconfigured Google Cloud Storage billing account would cause transcription to fail. The changes introduced in backend/utils/other/storage.py are straightforward and correct. By adding a check for the speech_profiles_bucket configuration and handling Forbidden exceptions, the get_user_has_speech_profile function is now more robust and will gracefully return False in these scenarios. This makes the Google Storage dependency optional as intended. The implementation is clean and I have no concerns. Good job!

Love you gemini :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant